package com.icode.translate.startup;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: alexz
 * Date: 14-6-30
 * Time: 下午4:22
 * To change this template use File | Settings | File Templates.
 */
public class Main {

    public static void main(String[] args) throws Exception {
        ApplicationContext context = new AnnotationConfigApplicationContext(StartupConfig.class);
        TranslateClient translateClient = (TranslateClient) context.getBean("translateClient");
        List<String> results = translateClient.translateWord("master");
        for (String result : results) {
            System.out.println(result);
        }

        System.out.println();

        results = translateClient.translateSentence("master");
        for (String result : results) {
            System.out.println(result);
        }

    }
}
